package model

import (
	"github.com/jmoiron/sqlx"
	. "zimuzu_cvn_web_api/pkg/e"
)

//记录是否存在
func ExistEthTransactions(db sqlx.Queryer, id int64) (bool, error) {
	var count int
	err := sqlx.Get(db, &count, "SELECT count(*) FROM eth_transactions WHERE id = ?", id)
	if err != nil {
		Log("err", err)
		return false, err
	}
	if count == 0 {
		return false, nil
	}
	return true, nil
}
